package frames;

import javax.swing.JFrame;
import javax.swing.JScrollPane;

/** Implements the startup program frame
 * @author Konstantin Dobrev
 * @version 1.0
 */
public class ProgramFrame extends JFrame {
	
	private static final String progName = "SQLManager";
	private ProgramMenuBar menuBar;
	private JScrollPane treePane;
	private DatabaseTree dbView;
	
	/**
	 * 
	 */
	public ProgramFrame() {
		super(progName);
		menuBar = new ProgramMenuBar(this);
		this.setJMenuBar(menuBar);
		
		dbView = new DatabaseTree(this);
		treePane = new JScrollPane(dbView);
		this.add(treePane);
	}
	
	/** Returns a reference of the database visualization tree
	 * which creates a view of the databases and their tables
	 * 
	 * @return reference to the database tree
	 */
	public DatabaseTree getDbTree() {
		return dbView;
	}
	
}
	
	
	
	
	
	